-- GENERATED SPELL FOR [Witherbark Berserker] --


function spell0_2558(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(3019,pUnit)
pUnit:RegisterEvent('Sorts_2558', 15000, 1)
end

function spell1_2558(pUnit, Event) --@Wither Touch,n/a--
pUnit:FullCastSpellOnTarget(4974,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2558', 570, 1)
end

function Sorts_2558(pUnit, Event)
local choix_sorts_2558 = math.random(0, 1)
if choix_sorts_2558 == 0 then
pUnit:RegisterEvent('spell0_2558', 1, 1)
end
if choix_sorts_2558 == 1 then
pUnit:RegisterEvent('spell1_2558', 1, 1)
end
end

function mob2558_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2558', math.random(1500, 3000), 1)
end

function mob2558_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2558_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2558_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2558, 1, 'mob2558_Action')
RegisterUnitEvent(2558, 2, 'mob2558_Leave')
RegisterUnitEvent(2558, 3, 'mob2558_Kill')
RegisterUnitEvent(2558, 4, 'mob2558_Die')
